//package com.inspur.edp.udt.rtgenerator.common;
//
//import com.inspur.edp.cef.entity.config.CefExtendConfig;
//import com.inspur.edp.cef.rtgenerator.common.CefPreCompileManager;
//import com.inspur.edp.cef.rtgenerator.common.CompileContext;
//import com.inspur.edp.lcm.metadata.api.entity.GspMetadata;
//import com.inspur.edp.udt.designtime.api.entity.UnifiedDataTypeDef;
//import lombok.var;
//
//import java.util.ArrayList;
//
//public class UdtCompileManager extends CefPreCompileManager
//{
//    private String configTypeName;
//
//    public UdtCompileManager(GspMetadata metadata) {
//        UnifiedDataTypeDef udt = (UnifiedDataTypeDef) metadata.getContent();
//        String typeName = udt.getCode() + "ConfigCollection";
//        String packageName = udt.getCoreAssemblyInfo().getAssemblyName();
//        configTypeName =  packageName+"."+ typeName;
//    }
//
//    @Override
//    protected String getConfigTypeName() {
//        return configTypeName;
//    }
//
//    @Override
//    protected void execute(CompileContext context) {
//        var udtConfig = getConfigs().get(0);
//        ArrayList<CefExtendConfig> entextConfigs = getExtendConfigs();
//
//        UdtTypeManager.getInstance()
//                .preCompile(udtConfig.getID(),
//                        udtConfig,
//                        entextConfigs,
//                        context.getGeneratedPath(),
//                        context.getServerPath(),
//                        context);
//    }
//
//
////	@Override
////	public void Deploy(DeploymentContext context)
////	{
////		if (!CefConfigBuffer.CefConfigs.ContainsKey("UDT"))
////		{
////			return;
////		}
//////C# TO JAVA CONVERTER TODO TASK: There is no equivalent to implicit typing in Java:
////		var udtConfigs = CefConfigBuffer.CefConfigs["UDT"];
//////C# TO JAVA CONVERTER TODO TASK: There is no equivalent to implicit typing in Java:
////		var generatedPath = Path.Combine(context.DebugEnvironmentInfo.ServerPath, context.DebugEnvironmentInfo.DeployPath, "libs");
//////C# TO JAVA CONVERTER TODO TASK: There is no equivalent to implicit typing in Java:
////		for (var udtConfig : udtConfigs)
////		{
////			try
////			{
////				UdtTypeManager.getInstance().PreCompile(udtConfig.getKey(), generatedPath, context.DebugEnvironmentInfo.ServerPath);
////			}
////			catch (RuntimeException e)
////			{
////				System.out.println("UDT："+ udtConfig.getKey()+"编译失败");
////			}
////		}
////	}
//}